/**
 * Generates a Fibonacci series.
 */
package com.asharism.projectEuler.problem002;

/**
 * @author Hitec
 *
 */
public final class Fibonacci {
	private int secondLastTerm = 0;
	private int lastTerm = 1;
	
	public int getNextTerm(){
		this.lastTerm += this.secondLastTerm;
		this.secondLastTerm = this.lastTerm - this.secondLastTerm;
		
		return lastTerm;
	}
}
